package com.boc.langxiang.net;


import com.boc.langxiang.entity.bean.AliPayOrderInfo;
import com.boc.langxiang.entity.bean.ShopBannerInfo;
import com.boc.langxiang.entity.response.AccountUpdateInfoContent;
import com.boc.langxiang.entity.response.AccountUpdatePasswordContent;
import com.boc.langxiang.entity.response.AccountUpdateSexContent;
import com.boc.langxiang.entity.response.AddAddressContent;
import com.boc.langxiang.entity.response.AddressListContent;
import com.boc.langxiang.entity.response.AdmAboutContent;
import com.boc.langxiang.entity.response.AdmDetailContent;
import com.boc.langxiang.entity.response.AdmFollowContent;
import com.boc.langxiang.entity.response.AdmListContent;
import com.boc.langxiang.entity.response.AritstMessageContent;
import com.boc.langxiang.entity.response.ArticleShareDetailContent;
import com.boc.langxiang.entity.response.ArtistArtsContent;
import com.boc.langxiang.entity.response.BaseResponse;
import com.boc.langxiang.entity.response.CanyulistContent;
import com.boc.langxiang.entity.response.CollectionContent;
import com.boc.langxiang.entity.response.ConcernListContent;
import com.boc.langxiang.entity.response.ConcernsCancelContent;
import com.boc.langxiang.entity.response.DepthContent;
import com.boc.langxiang.entity.response.FeedbackListContent;
import com.boc.langxiang.entity.response.IndexArticleContent;
import com.boc.langxiang.entity.response.MyCollectionContent;
import com.boc.langxiang.entity.response.MytobecanyuContnet;
import com.boc.langxiang.entity.response.OrderBillingResponse;
import com.boc.langxiang.entity.response.OrdersAllContent;
import com.boc.langxiang.entity.response.OrdersDetailReturnProductContent;
import com.boc.langxiang.entity.response.OrdersDetailWaitDeliveryContent;
import com.boc.langxiang.entity.response.OrdersDetailWaitPayContent;
import com.boc.langxiang.entity.response.OrdersDetailWaitReceiveContent;
import com.boc.langxiang.entity.response.OrdersReturnProductContent;
import com.boc.langxiang.entity.response.OrdersWaitDeliveryContent;
import com.boc.langxiang.entity.response.OrdersWaitPayContent;
import com.boc.langxiang.entity.response.OrdersWaitReceiveContent;
import com.boc.langxiang.entity.response.PostOrderContent;
import com.boc.langxiang.entity.response.ProductBuyContent;
import com.boc.langxiang.entity.response.ProductDetailContent;
import com.boc.langxiang.entity.response.ProductListContent;
import com.boc.langxiang.entity.response.ProductListContent2;
import com.boc.langxiang.entity.response.ReturnOrdersPageContent;
import com.boc.langxiang.entity.response.ShaloBaomingContent;
import com.boc.langxiang.entity.response.ShaloDetailContent;
import com.boc.langxiang.entity.response.ShaloListContent;
import com.boc.langxiang.entity.response.ShopGoodsContent;
import com.boc.langxiang.entity.response.ShoppingCarContent;
import com.boc.langxiang.entity.response.ShoppingCarNumContent;
import com.boc.langxiang.entity.response.SmsCodeEntity;
import com.boc.langxiang.entity.response.SpecialLikeContent;
import com.boc.langxiang.entity.response.SpecialListContent;
import com.boc.langxiang.entity.response.SpecialTopicDetailContent;
import com.boc.langxiang.entity.response.SpecialTopicShareContent;
import com.boc.langxiang.entity.response.UserInfo;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

/**
 * CreateTime: 2016-03-30上午9:42
 * Author: wjkjinke00@126.com
 * Description:
 */
public interface ApiService {

    /**
     * 获取短信验证码
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("login/smsCode")
    Observable<BaseResponse<SmsCodeEntity>> smsCode(@FieldMap Map<String, String> params);

    /**
     * 注册
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("regist/registpost")
    Observable<BaseResponse<UserInfo>> regist(@FieldMap Map<String, String> params);

    /**
     * 登陆
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("login/withPwd")
    Observable<BaseResponse<UserInfo>> login(@FieldMap Map<String, String> params);

    /**
     * 忘记密码发送验证码
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("regist/accountFindCode")
    Observable<BaseResponse<SmsCodeEntity>> accountFindCode(@FieldMap Map<String, String> params);

    /**
     * 找回密码
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("regist/accountFindPwd")
    Observable<BaseResponse<UserInfo>> accountFindPwd(@FieldMap Map<String, String> params);

    /**
     * 增加地址
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("address/create")
    Observable<BaseResponse<AddAddressContent>> createAddress(@FieldMap Map<String, String> params);

    /**
     * 获取地址列表
     *
     * @param token
     * @return
     */
    @FormUrlEncoded
    @POST("address/getList")
    Observable<BaseResponse<AddressListContent>> getAddressList(@Field("token") String token);

    /**
     * 删除收货地址
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("address/delete")
    Observable<BaseResponse> deleteAddress(@FieldMap Map<String, String> params);

    /**
     * 首页文章
     *
     * @param
     * @return
     */
    @FormUrlEncoded
    @POST("welcome/getFlaglist")
    Observable<BaseResponse<IndexArticleContent>> getFlaglist(@Field("token") String token);

    /**
     * 热门文章
     *
     * @param token
     * @return
     */
    @FormUrlEncoded
    @POST("welcome/getList")
    Observable<BaseResponse<IndexArticleContent>> getList(@FieldMap Map<String, String> params);


    /**
     * 专题列表(商城)
     */
    @FormUrlEncoded
    @POST("special/s_list")
    Observable<BaseResponse<SpecialListContent>> getSpecialList(@FieldMap Map<String, String> params);

    /**
     * 产品列表
     */
    @FormUrlEncoded
    @POST("product/p_list")
    Observable<BaseResponse<ProductListContent2>> getProductsList(@FieldMap Map<String, String> params);

    /**
     * 产品详情
     */
    @FormUrlEncoded
    @POST("product/p_detail")
    Observable<BaseResponse<ProductDetailContent>> getProductDetail(@FieldMap Map<String, String> params);

    /**
     * 深度列表（产品分类）
     */
    @FormUrlEncoded
    @POST("product/p_ctype")
    Observable<BaseResponse<DepthContent>> getDepthList(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("account/articlefeedback")
    Observable<BaseResponse> articlefeedback(@FieldMap Map<String, String> params);

    /**
     * 购物车列表
     */
    @FormUrlEncoded
    @POST("productcarts/cartslist")
    Observable<BaseResponse<ShoppingCarContent>> getShoppingCarList(@FieldMap Map<String, String> params);

    /**
     * 修改昵称
     */
    @FormUrlEncoded
    @POST("account/accountUpdateNickName")
    Observable<BaseResponse<AccountUpdatePasswordContent>> accountUpdateNickName(@FieldMap Map<String, String> params);

    /**
     * 全部订单
     */
    @FormUrlEncoded
    @POST("productorders/allorders")
    Observable<BaseResponse<OrdersAllContent>> allorders(@FieldMap Map<String, String> params);


    /**
     * 待付款
     */
    @FormUrlEncoded
    @POST("productorders/to_pay_orders")
    Observable<BaseResponse<OrdersWaitPayContent>> toPayOrders(@FieldMap Map<String, String> params);

    /**
     * 添加购物车
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("productcarts/addcarts")
    Observable<BaseResponse> addToShoppingCar(@FieldMap Map<String, String> params);

    /**
     * 待发货
     */
    @FormUrlEncoded
    @POST("productorders/to_send_orders")
    Observable<BaseResponse<OrdersWaitDeliveryContent>> toSendOrders(@FieldMap Map<String, String> params);

    /**
     * 购物车删除商品
     *
     * @param params
     */
    @FormUrlEncoded
    @POST("productcarts/delcart")
    Observable<BaseResponse> deleteShoppingCar(@FieldMap Map<String, String> params);

    /**
     * 购物车商品数量增加
     *
     * @param params
     */
    @FormUrlEncoded
    @POST("productcarts/addnumber")
    Observable<BaseResponse> shoppingCarAddNumber(@FieldMap Map<String, String> params);

    /**
     * 购物车商品数量减少
     *
     * @param params
     */
    @FormUrlEncoded
    @POST("productcarts/minusnumber")
    Observable<BaseResponse> shoppingCarMinusNumber(@FieldMap Map<String, String> params);

    /**
     * adm列表
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("adm/adm_list")
    Observable<BaseResponse<AdmListContent>> admList(@FieldMap Map<String, String> params);

    /**
     * adm展开
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("adm/adm_detail")
    Observable<BaseResponse<AdmDetailContent>> admDetail(@FieldMap Map<String, String> params);

    /**
     * 结算（购物车）
     *
     * @param params (Map)
     */
    @FormUrlEncoded
    @POST("productcarts/balance")
    Observable<OrderBillingResponse> orderBilling(@FieldMap Map<String, String> params);

    /**
     * 产品流出页banner图
     *
     * @param def=1
     */
    @FormUrlEncoded
    @POST("product/get_banner")
    Observable<BaseResponse<List<ShopBannerInfo>>> shopBanner(@Field("default") int def);

    /**
     * 流出精品
     *
     * @param def=1
     */
    @FormUrlEncoded
    @POST("product/goods_list")
    Observable<BaseResponse<ShopGoodsContent>> shopGoods(@Field("default") int def);

    /**
     * 商城所有产品
     *
     * @param
     */
    @FormUrlEncoded
    @POST("product/all_products")
    Observable<BaseResponse<ShopGoodsContent>> shopAllProduct(@Field("default") int def);

    /**
     * 商城流出专题
     */
    @FormUrlEncoded
    @POST("product/zhuan_list")
    Observable<BaseResponse<ShopGoodsContent>> shopSpecialTopic(@Field("default") int def);

    /**
     * 待收货
     */
    @FormUrlEncoded
    @POST("productorders/to_receipt_orders")
    Observable<BaseResponse<OrdersWaitReceiveContent>> toReceiptOrders(@FieldMap Map<String, String> params);

    /**
     * 退货
     */
    @FormUrlEncoded
    @POST("productorders/return_product")
    Observable<BaseResponse<OrdersReturnProductContent>> returnProduct(@FieldMap Map<String, String> params);


    /**
     * 关注设计师
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("adm/adm_follow")
    Observable<BaseResponse<AdmFollowContent>> admFollow(@FieldMap Map<String, String> params);

    /**
     * 文章分享
     *
     * @param aid
     * @return
     */
    @FormUrlEncoded
    @POST("welcome/share_click")
    Observable<BaseResponse<ArticleShareDetailContent>> shareClick(@Field("aid") String aid);

    /**
     * 修改收货地址
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("address/edit")
    Observable<BaseResponse> editAddress(@FieldMap Map<String, String> params);


    /**
     * 我的关注
     */
    @FormUrlEncoded
    @POST("account/concernlist")
    Observable<BaseResponse<ConcernListContent>> concernList(@FieldMap Map<String, String> params);

    /**
     * 取消关注
     */
    @FormUrlEncoded
    @POST("account/del_concernlist")
    Observable<BaseResponse<ConcernsCancelContent>> delConcernlist(@FieldMap Map<String, String> params);

    /**
     * 沙龙列表
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("product/sha_list")
    Observable<BaseResponse<ShaloListContent>> shaList(@FieldMap Map<String, String> params);

    /**
     * 我的收藏
     */
    @FormUrlEncoded
    @POST("account/mycollect")
    Observable<BaseResponse<MyCollectionContent>> myCollection(@FieldMap Map<String, String> params);


    /**
     * 提交订单
     */
    @FormUrlEncoded
    @POST("productorders/postorder")
    Observable<BaseResponse<PostOrderContent>> postOrder(@FieldMap Map<String, String> params);

    /**
     * 产品搜索
     *
     * @param params
     */
    @FormUrlEncoded
    @POST("product/p_search")
    Observable<BaseResponse<ProductListContent>> searchProducts(@FieldMap Map<String, String> params);

    /**
     * 修改密码
     *
     * @param params
     */
    @FormUrlEncoded
    @POST("account/accountUpdatePassword")
    Observable<BaseResponse<AccountUpdatePasswordContent>> accountUpdatePassword(@FieldMap Map<String, String> params);


    /**
     * 沙龙回复
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("product/message_create")
    Observable<BaseResponse> shaloMessage(@FieldMap Map<String, String> params);

    /**
     * 购物车数量修改
     */
    @FormUrlEncoded
    @POST("productcarts/cartnumberupdate")
    Observable<BaseResponse> updateShoppingCarNumber(@FieldMap Map<String, String> params);

    /**
     * 沙龙详情
     *
     * @param id
     * @return
     */
    @FormUrlEncoded
    @POST("product/sha_detail")
    Observable<BaseResponse<ShaloDetailContent>> shaDetail(@Field("id") int id);

    /**
     * 帐号设置-资料编辑
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("account/accountUpdateInfo")
    Observable<BaseResponse<AccountUpdateInfoContent>> accountUpdateInfo(@FieldMap Map<String, String> params);

    /**
     * ADM-关于
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("adm/adm_about")
    Observable<BaseResponse<AdmAboutContent>> admAbout(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("product/goods_more")
    Observable<BaseResponse<ProductListContent>> getProductGoods(@FieldMap Map<String, String> params);

    /**
     * 待付款详情
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("productorders/to_pay_orders_info")
    Observable<BaseResponse<OrdersDetailWaitPayContent>> toPayOrdersInfo(@FieldMap Map<String, String> params);

    /**
     * 待发货详情
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("productorders/to_send_orders_info")
    Observable<BaseResponse<OrdersDetailWaitDeliveryContent>> toSendOrdersInfo(@FieldMap Map<String, String> params);

    /**
     * 待收货详情
     */
    @FormUrlEncoded
    @POST(" productorders/to_receipt_orders_info")
    Observable<BaseResponse<OrdersDetailWaitReceiveContent>> toReceiptOrdersInfo(@FieldMap Map<String, String> params);

    /**
     * 申请退款-详情
     */
    @FormUrlEncoded
    @POST("productorders/return_orders_info")
    Observable<BaseResponse<OrdersDetailReturnProductContent>> returnOrdersInfo(@FieldMap Map<String, String> params);

    /**
     * adm留言提交
     */
    @FormUrlEncoded
    @POST("account/feedback")
    Observable<BaseResponse> feedback(@FieldMap Map<String, String> params);

    /**
     * adm-留言-列表
     */
    @FormUrlEncoded
    @POST("account/feedbacklist")
    Observable<BaseResponse<FeedbackListContent>> feedbackList(@FieldMap Map<String, String> params);

    /**
     * adm相关作品
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("adm/adm_product")
    Observable<BaseResponse<ArtistArtsContent>> admProduct(@FieldMap Map<String, String> params);

    /**
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("adm/adm_message")
    Observable<BaseResponse<AritstMessageContent>> admMessage(@FieldMap Map<String, String> params);

    /**
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("adm/message_create")
    Observable<BaseResponse> messageCreate(@FieldMap Map<String, String> params);

    /**
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("adm/adm_search")
    Observable<BaseResponse<AdmListContent>> admSearch(@FieldMap Map<String, String> params);

    /**
     * 修改性别
     */
    @FormUrlEncoded
    @POST("account/accountUpdateSex")
    Observable<BaseResponse<AccountUpdateSexContent>> accountUpdateSex(@FieldMap Map<String, String> params);

    /**
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("account/modify_photo")
    Observable<BaseResponse> modifyHead(@FieldMap Map<String, String> params);


    /**
     * 我的活动想参与
     */
    @FormUrlEncoded
    @POST("account/mytobecanyu")
    Observable<BaseResponse<MytobecanyuContnet>> mytobecanyu(@FieldMap Map<String, String> params);

    /**
     * 我的活动想参与
     */
    @FormUrlEncoded
    @POST("account/canyulist")
    Observable<BaseResponse<CanyulistContent>> canyulist(@FieldMap Map<String, String> params);

    /**
     * 我的活动-想参与-删除
     */
    @FormUrlEncoded
    @POST("account/del_mytobecanyu")
    Observable<BaseResponse> delMytobecanyu(@FieldMap Map<String, String> params);


    /**
     * 订单取消
     */
    @FormUrlEncoded
    @POST("productorders/cancel_orders")
    Observable<BaseResponse> cancelOrders(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("adm/word_list")
    Observable<BaseResponse<ArrayList<String>>> wordList(@Field("default") int defaul);

    /**
     * 产品收藏
     */
    @FormUrlEncoded
    @POST("product/product_collect")
    Observable<BaseResponse<CollectionContent>> collectProduct(@Field("product_id") String id, @Field("token") String token);

    /**
     * 专题点赞
     *
     * @param id
     * @param token
     */
    @FormUrlEncoded
    @POST("special/special_click")
    Observable<BaseResponse<SpecialLikeContent>> specialLike(@Field("special_id") String id, @Field("token") String token);

    /**
     * 专题详情
     *
     * @param params
     */
    @FormUrlEncoded
    @POST("special/special_detail")
    Observable<BaseResponse<SpecialTopicDetailContent>> specialDetail(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("special/share_click")
    Observable<BaseResponse<SpecialTopicShareContent>> specialShareData(@Field("id") String id);

    /**
     * 申请退款页面
     */
    @FormUrlEncoded
    @POST("productorders/return_orders_page")
    Observable<BaseResponse<ReturnOrdersPageContent>> returnOrdersPage(@FieldMap Map<String, String> params);

    /**
     * 申请退款-提交
     */
    @FormUrlEncoded
    @POST("productorders/return_orders_post")
    Observable<BaseResponse> returnOrdersPost(@FieldMap Map<String, String> params);

    /**
     * 删除我的收藏
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("account/del_mycollect")
    Observable<BaseResponse> delMycollect(@FieldMap Map<String, String> params);

    /**
     * 设置默认地址
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("address/set_default")
    Observable<BaseResponse> setDefaultAddress(@FieldMap Map<String, String> params);

    /**
     * 沙龙报名
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("productorders/baoming")
    Observable<BaseResponse<ShaloBaomingContent>> shaloBaoming(@FieldMap Map<String, String> params);


    /**
     * 立即购买
     */
    @FormUrlEncoded
    @POST("productorders/buynow")
    Observable<BaseResponse<ProductBuyContent>> buyNow(@FieldMap Map<String, String> params);

    /**
     * 确认收货
     */
    @FormUrlEncoded
    @POST("productorders/confirm_receipt")
    Observable<BaseResponse> confirmReceipt(@FieldMap Map<String, String> params);

    /**
     * 第三方登录
     *
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("login/otherslogin")
    Observable<BaseResponse<UserInfo>> authLogin(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("account/binding")
    Observable<BaseResponse<UserInfo>> bindPhone(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("account/binding_pwd")
    Observable<BaseResponse<UserInfo>> bindPhoneByPwd(@FieldMap Map<String, String> params);

    /**
     *
     */
    @FormUrlEncoded
    @POST("account/getuser")
    Observable<BaseResponse<UserInfo>> getuser(@Field("token") String token);

    @FormUrlEncoded
    @POST("productcarts/cartnumber")
    Observable<BaseResponse<ShoppingCarNumContent>> getShoppingCarNum(@Field("token") String token);

    /**
     * 定制提交
     */
    @FormUrlEncoded
    @POST("account/dingzhi")
    Observable<BaseResponse> postCustomizedInfo(@FieldMap Map<String, String> params);

    /**
     * 产品详情-去定制
     */
    @FormUrlEncoded
    @POST("account/godingzhi")
    Observable<BaseResponse> productCustomize(@FieldMap Map<String, String> params);

    /**
     * 支付接口
     */
    @FormUrlEncoded
    @POST("orderpaylist/go")
    Observable<BaseResponse<AliPayOrderInfo>> orderPay(@FieldMap Map<String, String> params);

    /**
     * 验证短信码是否正确
     *
     * @return
     */
    @FormUrlEncoded
    @POST("regist/smsCode_verify")
    Observable<BaseResponse> smsCodeVerify(@Field("phone") String phone, @Field("smscode") String smscode);

}
